<section class="blueBg contentCntr">
    <div class="container">
        <div class="row">        	
            <div class="wide980">
                <div class="span12">
                    <div class="addmarginB10">
                        <h3 class="font-opensanslt remmarginT fnt-size24 txttTransformNorml txtfff fntweghtNml">Previously Taught Classes<a href="<?php echo $this->createAbsoluteUrl('/users/previousclasses',array('authKey'=>$authKey));?>" class="addmarginT5 txtfff fnt-size12 floatR">See all</a></h3>
                        <div class="crsl-items_previous_class" data-navigation="crslNavOne">
                            <div class="crsl-wrap">
                                <?php
                                 $emptyImage = '<img src="' . baseUrl() . '../../' . getUploadDir() . '/no-class-image-240X180.jpg"   alt="class" id="classcourse">';
                                foreach ($priviousClasses as $priviousClasse) {
                                    if (!empty($priviousClasse['classes_id'])) {
                                        $imageName = ClassImage::getPrimaryImage($priviousClasse['classes_id']);
                                        $courseName = $priviousClasse['class_titile'];
                                        $userDetails = getUserTypeByClassCourse('Classes', $priviousClasse['classes_id']);
                                        $imagePath = getImagePathByClassCourse('Classes', $priviousClasse['classes_id']);
                                        $url = $this->createAbsoluteUrl('/classes/viewclass', array('id' => $priviousClasse['classes_id']));
                                    } else {
                                        $imageName = ClassImage::getCoursesPrimaryImage($priviousClasse['courses_id']);
                                        $courseName = $priviousClasse['course_titile'];
                                        $userDetails = getUserTypeByClassCourse('Courses', $priviousClasse['courses_id']);
                                        $imagePath = getImagePathByClassCourse('Courses', $priviousClasse['courses_id']);
                                        $url = $this->createAbsoluteUrl('/courses/viewcourse', array('id' => $priviousClasse['courses_id']));
                                    }
                                    ?>
                                    <figure class="crsl-item">
                                        <div class="padding20px">
                                            <a href="<?php echo $url; ?>" ><?php echo (!empty($imageName)) ? '<img src="' . baseUrl() . '../../' . SkillConfig::getClassCourseImagePath($imagePath) . '240X180/' . $imageName . '"  alt="' . $courseName . '">':$emptyImage; ?></a>
                                            <p class="remmarginB font-opensansbd txtUpCase fnt-size11 txt999">By  <?php echo substr($userDetails->first_name . '  ' . $userDetails->last_name, 0, 30); ?></p>
                                            <a href="<?php echo $url; ?>" > <h6 class="remmarginT font-opensansbd txtUpCase fnt-size14 txt737 classcourseHeight"><?php echo substrclasscourname($courseName); ?></h6></a>
                                        </div>
                                    </figure>
                                <?php } ?>

                            </div>                        

                        </div>                      
                    </div>                 
                </div>
                <div id="crslNavOne" class="crsl-nav">
                    <a href="javascript:void();" class="previous"><img src="<?php echo ThemePath(); ?>/images/white-left-aw.png" alt="left-slide" /></a>
                    <a href="javascript:void();" class="next"><img src="<?php echo ThemePath(); ?>/images/white-right-aw.png" alt="right-slide" /></a>
                </div> 
            </div>   
        </div>
    </div>
</div>
</section>